package com.wyg.epcommonbase.common.util.base;

import org.springframework.util.Assert;

import java.lang.reflect.Method;
import java.lang.reflect.Modifier;

/**
 * Description:
 *
 * @author WangYongGan
 * @since 2022/5/20 11:36
 */
public class ReflectUtil {
    public static String getMethodKey(Method method) {
        Assert.notNull(method, "参数不能为Null");
        return method.getName();
    }

    public static String getMethodKeyWithModifier(Method method) {
        Assert.notNull(method, "参数不能为Null");
        return Modifier.toString(method.getModifiers()) + method.getName();
    }
}
